<?php

namespace App\Http\Controllers\Page;

use App\Http\Controllers\Base\Base;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Redirect;

class Homepage extends Controller
{
    private $baseClass;

    function __construct()
    {
        $this->baseClass = new Base();
    }

    /**
     *  首页
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
    public function homePage(){
        $arrayData = array();
        if ($this->baseClass->checkLoginStatus() == true){
            return Redirect::to('table', 301);
        }
        else {
            $viewPage = 'login';
        }
        return view($viewPage, $arrayData);
    }
}
